const db = require('../../../libs/db.config');

module.exports = async (data) => {
    const searchSQL = 'select shoppingcar.number, shoppingcar.cID, shoppingcar.pID, commodity.pay, commodity.userID as seller, commodity.title, commodity.images, userinfo.userName from shoppingcar join commodity on commodity.pID = shoppingcar.pID join userinfo on userinfo.userID = commodity.userID where shoppingcar.userID = ?';
    return await db.query(searchSQL, [data.userID]);
};
